home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / aguplus / agu.bst < prev    next >
Text File  |  1994-05-29  |  22KB  |  1,146 lines

  1. %% 
  2. %% This is file `agu.bst', generated 
  3. %% on <1994/5/27> with the docstrip utility (2.2e).
  4. %% 
  5. %% The original source files were:
  6. %% 
  7. %% genbst.mbs  (with options: `ay,seq-lab,nm-rev1,nmlm,x9,m1,dt-end,thtit-a,vol-it,volp-com,edby,blk-com,pp,ed,abr,lab-it,and-com,em-it')
  8. %% ---------------------------------------- 
  9. %% *** For publications of the American Geophysical Union *** 
  10. %% 
  11. %% (Here are the specifications of the source file)
  12. %% \def\filename{genbst.mbs}
  13. %% \def\filedate{1994 February 7}
  14. %% \def\fileversion{1.2}
  15. %%   For use with BibTeX version 0.99a or later, LaTeX version 2.09
  16. %%-------------------------------------------------------------------
  17. %% NOTICE:
  18. %% This file may be used for non-profit purposes.
  19. %% It may not be distributed in exchange for money,
  20. %%   other than distribution costs.
  21. %%
  22. %% The author provides it `as is' and does not guarantee it in any way.
  23. %%
  24. %% Copyright (C) 1993 Patrick W. Daly
  25. %% Max-Planck-Institut f\"ur Aeronomie
  26. %% Postfach 20
  27. %% D-37189 Katlenburg-Lindau
  28. %% Germany
  29. %%
  30. %% E-mail:
  31. %% SPAN--     nsp::linmpi::daly    (note nsp also known as ecd1)
  32. %% Internet-- daly@linmpi.dnet.gwdg.de
  33. %%-----------------------------------------------------------
  34. %% \CharacterTable
  35. %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
  36. %%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
  37. %%   Digits        \0\1\2\3\4\5\6\7\8\9
  38. %%   Exclamation   \!     Double quote  \"     Hash (number) \#
  39. %%   Dollar        \$     Percent       \%     Ampersand     \&
  40. %%   Acute accent  \'     Left paren    \(     Right paren   \)
  41. %%   Asterisk      \*     Plus          \+     Comma         \,
  42. %%   Minus         \-     Point         \.     Solidus       \/
  43. %%   Colon         \:     Semicolon     \;     Less than     \<
  44. %%   Equals        \=     Greater than  \>     Question mark \?
  45. %%   Commercial at \@     Left bracket  \[     Backslash     \\
  46. %%   Right bracket \]     Circumflex    \^     Underscore    \_
  47. %%   Grave accent  \`     Left brace    \{     Vertical bar  \|
  48. %%   Right brace   \}     Tilde         \~}
  49. %%---------------------------------------------------------------------
  50.  % This is an author-year citation style bibliography. As such, it is
  51.  % non-standard LaTeX, and requires a style option to function properly.
  52.  % An appropriate style option is:   natbib.sty    by Patrick W. Daly
  53.  % The form of the \bibitem entries is
  54.  %   \bibitem[Jones et al.(1990)]{key}...
  55.  % The essential feature is that the label (the part in brackets) consists
  56.  % of the author names, as they should appear in the citation, with the year
  57.  % in parentheses following. There must be no space before the opening
  58.  % parenthesis!
  59.  % In natbib.sty, it is possible to define the type of enclosures that is
  60.  % really wanted (brackets or parentheses), but in either case, there must
  61.  % be parentheses in the label.
  62.  % The \cite command functions as follows:
  63.  %   \cite{key} ==>>                Jones et al. (1990)
  64.  %   \cite[]{key} ==>>              (Jones et al., 1990)
  65.  %   \cite[chap. 2]{key} ==>>       (Jones et al., 1990, chap. 2)
  66.  %   \cite[e.g.][]{key} ==>>        (e.g. Jones et al., 1990)
  67.  %   \cite[e.g.][p. 32]{key} ==>>   (e.g. Jones et al., p. 32)
  68.  %   \citeauthor{key}               Jones et al.
  69.  %   \citeyear{key}                 1990
  70. %%---------------------------------------------------------------------
  71.  
  72. ENTRY
  73.   { address
  74.     author
  75.     booktitle
  76.     chapter
  77.     edition
  78.     editor
  79.     howpublished
  80.     institution
  81.     journal
  82.     key
  83.     month
  84.     note
  85.     number
  86.     organization
  87.     pages
  88.     publisher
  89.     school
  90.     series
  91.     title
  92.     type
  93.     volume
  94.     year
  95.   }
  96.   {}
  97.   { label extra.label sort.label }
  98.  
  99. INTEGERS { output.state before.all mid.sentence after.sentence after.block }
  100.  
  101. FUNCTION {init.state.consts}
  102. { #0 'before.all :=
  103.   #1 'mid.sentence :=
  104.   #2 'after.sentence :=
  105.   #3 'after.block :=
  106. }
  107.  
  108. STRINGS { s t }
  109.  
  110. FUNCTION {output.nonnull}
  111. { 's :=
  112.   output.state mid.sentence =
  113.     { ", " * write$ }
  114.     { output.state after.block =
  115.         { add.period$ write$
  116.           newline$
  117.           "\newblock " write$
  118.         }
  119.         { output.state before.all =
  120.             'write$
  121.             { add.period$ " " * write$ }
  122.           if$
  123.         }
  124.       if$
  125.       mid.sentence 'output.state :=
  126.     }
  127.   if$
  128.   s
  129. }
  130.  
  131. FUNCTION {output}
  132. { duplicate$ empty$
  133.     'pop$
  134.     'output.nonnull
  135.   if$
  136. }
  137.  
  138. FUNCTION {output.check}
  139. { 't :=
  140.   duplicate$ empty$
  141.     { pop$ "empty " t * " in " * cite$ * warning$ }
  142.     'output.nonnull
  143.   if$
  144. }
  145.  
  146. FUNCTION {output.bibitem}
  147. { newline$
  148.   "\bibitem[" write$
  149.   label write$
  150.   ")]{" write$
  151.   cite$ write$
  152.   "}" write$
  153.   newline$
  154.   ""
  155.   before.all 'output.state :=
  156. }
  157.  
  158. FUNCTION {fin.entry}
  159. { add.period$
  160.   write$
  161.   newline$
  162. }
  163.  
  164. FUNCTION {new.block}
  165. { output.state before.all =
  166.     'skip$
  167.     { after.block 'output.state := }
  168.   if$
  169. }
  170.  
  171. FUNCTION {new.sentence}
  172. { output.state after.block =
  173.     'skip$
  174.     { output.state before.all =
  175.         'skip$
  176.         { after.sentence 'output.state := }
  177.       if$
  178.     }
  179.   if$
  180. }
  181.  
  182. FUNCTION {not}
  183. {   { #0 }
  184.     { #1 }
  185.   if$
  186. }
  187.  
  188. FUNCTION {and}
  189. {   'skip$
  190.     { pop$ #0 }
  191.   if$
  192. }
  193.  
  194. FUNCTION {or}
  195. {   { pop$ #1 }
  196.     'skip$
  197.   if$
  198. }
  199.  
  200. FUNCTION {new.block.checkb}
  201. { empty$
  202.   swap$ empty$
  203.   and
  204.     'skip$
  205.     'new.block
  206.   if$
  207. }
  208.  
  209. FUNCTION {field.or.null}
  210. { duplicate$ empty$
  211.     { pop$ "" }
  212.     'skip$
  213.   if$
  214. }
  215.  
  216. FUNCTION {emphasize}
  217. { duplicate$ empty$
  218.     { pop$ "" }
  219.     { "{\it " swap$ * "}" * }
  220.   if$
  221. }
  222.  
  223. INTEGERS { nameptr namesleft numnames }
  224.  
  225. FUNCTION {format.names}
  226. { 's :=
  227.   #1 'nameptr :=
  228.   s num.names$ 'numnames :=
  229.   numnames 'namesleft :=
  230.     { namesleft #0 > }
  231.     { nameptr #1 >
  232.         { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := }
  233.         { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := }
  234.       if$
  235.       nameptr #1 >
  236.         {
  237.           nameptr #2 =
  238.           numnames #9 > and
  239.             { "others" 't :=
  240.               #1 'namesleft := }
  241.             'skip$
  242.           if$
  243.           namesleft #1 >
  244.             { ", " * t * }
  245.             {
  246.               "," *
  247.               t "others" =
  248.                 { " et~al." * }
  249.                 { " and " * t * }
  250.               if$
  251.             }
  252.           if$
  253.         }
  254.         't
  255.       if$
  256.       nameptr #1 + 'nameptr :=
  257.       namesleft #1 - 'namesleft :=
  258.     }
  259.   while$
  260. }
  261.  
  262. FUNCTION {format.names.ed}
  263. { 's :=
  264.   #1 'nameptr :=
  265.   s num.names$ 'numnames :=
  266.   numnames 'namesleft :=
  267.     { namesleft #0 > }
  268.     { s nameptr
  269.       "{f.~}{vv~}{ll}{, jj}"
  270.       format.name$ 't :=
  271.       nameptr #1 >
  272.         {
  273.           namesleft #1 >
  274.             { ", " * t * }
  275.             {
  276.               "," *
  277.               t "others" =
  278.                 { " et~al." * }
  279.                 { " and " * t * }
  280.               if$
  281.             }
  282.           if$
  283.         }
  284.         't
  285.       if$
  286.       nameptr #1 + 'nameptr :=
  287.       namesleft #1 - 'namesleft :=
  288.     }
  289.   while$
  290. }
  291.  
  292. FUNCTION {format.key}
  293. { empty$
  294.     { key field.or.null }
  295.     { "" }
  296.   if$
  297. }
  298.  
  299. FUNCTION {format.authors}
  300. { author empty$
  301.     { "" }
  302.     { author format.names }
  303.   if$
  304. }
  305.  
  306. FUNCTION {format.editors}
  307. { editor empty$
  308.     { "" }
  309.     { editor format.names
  310.       editor num.names$ #1 >
  311.         { " (eds.)" * }
  312.         { " (ed.)" * }
  313.       if$
  314.     }
  315.   if$
  316. }
  317.  
  318. FUNCTION {format.in.editors}
  319. { editor empty$
  320.     { "" }
  321.     { editor format.names.ed
  322.     }
  323.   if$
  324. }
  325.  
  326. FUNCTION {format.title}
  327. { title empty$
  328.     { "" }
  329.     { title "t" change.case$
  330.     }
  331.   if$
  332. }
  333.  
  334. FUNCTION {n.dashify}
  335. { 't :=
  336.   ""
  337.     { t empty$ not }
  338.     { t #1 #1 substring$ "-" =
  339.         { t #1 #2 substring$ "--" = not
  340.             { "--" *
  341.               t #2 global.max$ substring$ 't :=
  342.             }
  343.             {   { t #1 #1 substring$ "-" = }
  344.                 { "-" *
  345.                   t #2 global.max$ substring$ 't :=
  346.                 }
  347.               while$
  348.             }
  349.           if$
  350.         }
  351.         { t #1 #1 substring$ *
  352.           t #2 global.max$ substring$ 't :=
  353.         }
  354.       if$
  355.     }
  356.   while$
  357. }
  358.  
  359. FUNCTION {word.in}
  360. { "in " }
  361.  
  362. FUNCTION {format.date}
  363. { year duplicate$ empty$
  364.     { "empty year in " cite$ * "; set to ????" * warning$
  365.        pop$ "????" }
  366.     'skip$
  367.   if$
  368.   extra.label *
  369. }
  370.  
  371. FUNCTION {format.btitle}
  372. { title emphasize
  373. }
  374.  
  375. FUNCTION {tie.or.space.connect}
  376. { duplicate$ text.length$ #3 <
  377.     { "~" }
  378.     { " " }
  379.   if$
  380.   swap$ * *
  381. }
  382.  
  383. FUNCTION {either.or.check}
  384. { empty$
  385.     'pop$
  386.     { "can't use both " swap$ * " fields in " * cite$ * warning$ }
  387.   if$
  388. }
  389.  
  390. FUNCTION {format.bvolume}
  391. { volume empty$
  392.     { "" }
  393.     { "vol." volume tie.or.space.connect
  394.       series empty$
  395.         'skip$
  396.         { " of " * series emphasize * }
  397.       if$
  398.       "volume and number" number either.or.check
  399.     }
  400.   if$
  401. }
  402.  
  403. FUNCTION {format.number.series}
  404. { volume empty$
  405.     { number empty$
  406.         { series field.or.null }
  407.         { output.state mid.sentence =
  408.             { "no." }
  409.             { "No." }
  410.           if$
  411.           number tie.or.space.connect
  412.           series empty$
  413.             { "there's a number but no series in " cite$ * warning$ }
  414.             { " in " * series * }
  415.           if$
  416.         }
  417.       if$
  418.     }
  419.     { "" }
  420.   if$
  421. }
  422.  
  423. FUNCTION {format.edition}
  424. { edition empty$
  425.     { "" }
  426.     { output.state mid.sentence =
  427.         { edition "l" change.case$ " edn." * }
  428.         { edition "t" change.case$ " edn." * }
  429.       if$
  430.     }
  431.   if$
  432. }
  433.  
  434. INTEGERS { multiresult }
  435.  
  436. FUNCTION {multi.page.check}
  437. { 't :=
  438.   #0 'multiresult :=
  439.     { multiresult not
  440.       t empty$ not
  441.       and
  442.     }
  443.     { t #1 #1 substring$
  444.       duplicate$ "-" =
  445.       swap$ duplicate$ "," =
  446.       swap$ "+" =
  447.       or or
  448.         { #1 'multiresult := }
  449.         { t #2 global.max$ substring$ 't := }
  450.       if$
  451.     }
  452.   while$
  453.   multiresult
  454. }
  455.  
  456. FUNCTION {format.pages}
  457. { pages empty$
  458.     { "" }
  459.     { pages multi.page.check
  460.         { "pp." pages n.dashify tie.or.space.connect }
  461.         { "p." pages tie.or.space.connect }
  462.       if$
  463.     }
  464.   if$
  465. }
  466.  
  467. FUNCTION {format.vol.num.pages}
  468. { volume field.or.null
  469.   emphasize
  470.   number empty$
  471.     'skip$
  472.     { "(" number * ")" * *
  473.       volume empty$
  474.         { "there's a number but no volume in " cite$ * warning$ }
  475.         'skip$
  476.       if$
  477.     }
  478.   if$
  479.   pages empty$
  480.     'skip$
  481.     { duplicate$ empty$
  482.         { pop$ format.pages }
  483.         { ", " * pages n.dashify * }
  484.       if$
  485.     }
  486.   if$
  487. }
  488.  
  489. FUNCTION {format.chapter.pages}
  490. { chapter empty$
  491.     'format.pages
  492.     { type empty$
  493.         { "chap." }
  494.         { type "l" change.case$ }
  495.       if$
  496.       chapter tie.or.space.connect
  497.       pages empty$
  498.         'skip$
  499.         { ", " * format.pages * }
  500.       if$
  501.     }
  502.   if$
  503. }
  504.  
  505. FUNCTION {format.in.ed.booktitle}
  506. { booktitle empty$
  507.     { "" }
  508.     { editor empty$
  509.         { word.in booktitle emphasize * }
  510.         { word.in booktitle emphasize * ", edited by " *
  511.           format.in.editors * }
  512.       if$
  513.     }
  514.   if$
  515. }
  516.  
  517. FUNCTION {format.thesis.type}
  518. { type empty$
  519.     'skip$
  520.     { pop$
  521.       type "t" change.case$
  522.     }
  523.   if$
  524. }
  525.  
  526. FUNCTION {format.tr.number}
  527. { type empty$
  528.     { "Tech. Rep." }
  529.     'type
  530.   if$
  531.   number empty$
  532.     { "t" change.case$ }
  533.     { number tie.or.space.connect }
  534.   if$
  535. }
  536.  
  537. FUNCTION {format.article.crossref}
  538. {
  539.   word.in
  540.   "\cite{" * crossref * "}" *
  541. }
  542.  
  543. FUNCTION {format.book.crossref}
  544. { volume empty$
  545.     { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
  546.       word.in
  547.     }
  548.     { "vol." volume tie.or.space.connect
  549.       " of " *
  550.     }
  551.   if$
  552.   "\cite{" * crossref * "}" *
  553. }
  554.  
  555. FUNCTION {format.incoll.inproc.crossref}
  556. {
  557.   word.in
  558.   "\cite{" * crossref * "}" *
  559. }
  560.  
  561. FUNCTION {article}
  562. { output.bibitem
  563.   format.authors "author" output.check
  564.   author format.key output
  565.   format.title "title" output.check
  566.   crossref missing$
  567.     { journal emphasize "journal" output.check
  568.       format.vol.num.pages output
  569.     }
  570.     { format.article.crossref output.nonnull
  571.       format.pages output
  572.     }
  573.   if$
  574.   note output
  575.   format.date "year" output.check
  576.   fin.entry
  577. }
  578.  
  579. FUNCTION {book}
  580. { output.bibitem
  581.   author empty$
  582.     { format.editors "author and editor" output.check
  583.       editor format.key output
  584.     }
  585.     { format.authors output.nonnull
  586.       crossref missing$
  587.         { "author and editor" editor either.or.check }
  588.         'skip$
  589.       if$
  590.     }
  591.   if$
  592.   format.btitle "title" output.check
  593.   crossref missing$
  594.     { format.bvolume output
  595.       format.number.series output
  596.       new.sentence
  597.       publisher "publisher" output.check
  598.       address output
  599.     }
  600.     {
  601.       format.book.crossref output.nonnull
  602.     }
  603.   if$
  604.   format.edition output
  605.   note output
  606.   format.date "year" output.check
  607.   fin.entry
  608. }
  609.  
  610. FUNCTION {booklet}
  611. { output.bibitem
  612.   format.authors output
  613.   author format.key output
  614.   format.title "title" output.check
  615.   howpublished output
  616.   address output
  617.   note output
  618.   format.date "year" output.check
  619.   fin.entry
  620. }
  621.  
  622. FUNCTION {inbook}
  623. { output.bibitem
  624.   author empty$
  625.     { format.editors "author and editor" output.check
  626.       editor format.key output
  627.     }
  628.     { format.authors output.nonnull
  629.       crossref missing$
  630.         { "author and editor" editor either.or.check }
  631.         'skip$
  632.       if$
  633.     }
  634.   if$
  635.   format.btitle "title" output.check
  636.   crossref missing$
  637.     { format.bvolume output
  638.       format.chapter.pages "chapter and pages" output.check
  639.       format.number.series output
  640.       new.sentence
  641.       publisher "publisher" output.check
  642.       address output
  643.     }
  644.     { format.chapter.pages "chapter and pages" output.check
  645.       format.book.crossref output.nonnull
  646.     }
  647.   if$
  648.   format.edition output
  649.   note output
  650.   format.date "year" output.check
  651.   fin.entry
  652. }
  653.  
  654. FUNCTION {incollection}
  655. { output.bibitem
  656.   format.authors "author" output.check
  657.   author format.key output
  658.   format.title "title" output.check
  659.   crossref missing$
  660.     { format.in.ed.booktitle "booktitle" output.check
  661.       format.bvolume output
  662.       format.number.series output
  663.       format.chapter.pages output
  664.       new.sentence
  665.       publisher "publisher" output.check
  666.       address output
  667.       format.edition output
  668.     }
  669.     { format.incoll.inproc.crossref output.nonnull
  670.       format.chapter.pages output
  671.     }
  672.   if$
  673.   note output
  674.   format.date "year" output.check
  675.   fin.entry
  676. }
  677.  
  678. FUNCTION {inproceedings}
  679. { output.bibitem
  680.   format.authors "author" output.check
  681.   author format.key output
  682.   format.title "title" output.check
  683.   crossref missing$
  684.     { format.in.ed.booktitle "booktitle" output.check
  685.       format.bvolume output
  686.       format.number.series output
  687.       format.pages output
  688.       address output
  689.       new.sentence
  690.       organization output
  691.       publisher output
  692.     }
  693.     { format.incoll.inproc.crossref output.nonnull
  694.       format.pages output
  695.     }
  696.   if$
  697.   note output
  698.   format.date "year" output.check
  699.   fin.entry
  700. }
  701.  
  702. FUNCTION {conference} { inproceedings }
  703.  
  704. FUNCTION {manual}
  705. { output.bibitem
  706.   format.authors output
  707.   author format.key output
  708.   format.btitle "title" output.check
  709.   organization output
  710.   address output
  711.   format.edition output
  712.   note output
  713.   format.date "year" output.check
  714.   fin.entry
  715. }
  716.  
  717. FUNCTION {mastersthesis}
  718. { output.bibitem
  719.   format.authors "author" output.check
  720.   author format.key output
  721.   format.title "title" output.check
  722.   "Master's thesis" format.thesis.type output.nonnull
  723.   school "school" output.check
  724.   address output
  725.   note output
  726.   format.date "year" output.check
  727.   fin.entry
  728. }
  729.  
  730. FUNCTION {misc}
  731. { output.bibitem
  732.   format.authors output
  733.   author format.key output
  734.   format.title output
  735.   howpublished output
  736.   note output
  737.   format.date "year" output.check
  738.   fin.entry
  739. }
  740.  
  741. FUNCTION {phdthesis}
  742. { output.bibitem
  743.   format.authors "author" output.check
  744.   author format.key output
  745.   format.title "title" output.check
  746.   "Ph.D. thesis" format.thesis.type output.nonnull
  747.   school "school" output.check
  748.   address output
  749.   note output
  750.   format.date "year" output.check
  751.   fin.entry
  752. }
  753.  
  754. FUNCTION {proceedings}
  755. { output.bibitem
  756.   format.editors output
  757.   editor format.key output
  758.   format.btitle "title" output.check
  759.   format.bvolume output
  760.   format.number.series output
  761.   address output
  762.   new.sentence
  763.   organization output
  764.   publisher output
  765.   note output
  766.   format.date "year" output.check
  767.   fin.entry
  768. }
  769.  
  770. FUNCTION {techreport}
  771. { output.bibitem
  772.   format.authors "author" output.check
  773.   author format.key output
  774.   format.title "title" output.check
  775.   format.tr.number output.nonnull
  776.   institution "institution" output.check
  777.   address output
  778.   note output
  779.   format.date "year" output.check
  780.   fin.entry
  781. }
  782.  
  783. FUNCTION {unpublished}
  784. { output.bibitem
  785.   format.authors "author" output.check
  786.   author format.key output
  787.   format.title "title" output.check
  788.   note "note" output.check
  789.   format.date "year" output.check
  790.   fin.entry
  791. }
  792.  
  793. FUNCTION {default.type} { misc }
  794.  
  795. MACRO {jan} {"January"}
  796.  
  797. MACRO {feb} {"February"}
  798.  
  799. MACRO {mar} {"March"}
  800.  
  801. MACRO {apr} {"April"}
  802.  
  803. MACRO {may} {"May"}
  804.  
  805. MACRO {jun} {"June"}
  806.  
  807. MACRO {jul} {"July"}
  808.  
  809. MACRO {aug} {"August"}
  810.  
  811. MACRO {sep} {"September"}
  812.  
  813. MACRO {oct} {"October"}
  814.  
  815. MACRO {nov} {"November"}
  816.  
  817. MACRO {dec} {"December"}
  818.  
  819. MACRO {acmcs} {"ACM Computing Surveys"}
  820.  
  821. MACRO {acta} {"Acta Informatica"}
  822.  
  823. MACRO {cacm} {"Communications of the ACM"}
  824.  
  825. MACRO {ibmjrd} {"IBM Journal of Research and Development"}
  826.  
  827. MACRO {ibmsj} {"IBM Systems Journal"}
  828.  
  829. MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
  830.  
  831. MACRO {ieeetc} {"IEEE Transactions on Computers"}
  832.  
  833. MACRO {ieeetcad}
  834.  {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
  835.  
  836. MACRO {ipl} {"Information Processing Letters"}
  837.  
  838. MACRO {jacm} {"Journal of the ACM"}
  839.  
  840. MACRO {jcss} {"Journal of Computer and System Sciences"}
  841.  
  842. MACRO {scp} {"Science of Computer Programming"}
  843.  
  844. MACRO {sicomp} {"SIAM Journal on Computing"}
  845.  
  846. MACRO {tocs} {"ACM Transactions on Computer Systems"}
  847.  
  848. MACRO {tods} {"ACM Transactions on Database Systems"}
  849.  
  850. MACRO {tog} {"ACM Transactions on Graphics"}
  851.  
  852. MACRO {toms} {"ACM Transactions on Mathematical Software"}
  853.  
  854. MACRO {toois} {"ACM Transactions on Office Information Systems"}
  855.  
  856. MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
  857.  
  858. MACRO {tcs} {"Theoretical Computer Science"}
  859.  
  860. READ
  861.  
  862. FUNCTION {sortify}
  863. { purify$
  864.   "l" change.case$
  865. }
  866.  
  867. INTEGERS { len }
  868.  
  869. FUNCTION {chop.word}
  870. { 's :=
  871.   'len :=
  872.   s #1 len substring$ =
  873.     { s len #1 + global.max$ substring$ }
  874.     's
  875.   if$
  876. }
  877.  
  878. FUNCTION {format.lab.names}
  879. { 's :=
  880.   s #1 "{vv~}{ll}" format.name$
  881.   s num.names$ duplicate$
  882.   #2 >
  883.     { pop$ " et~al." * }
  884.     { #2 <
  885.         'skip$
  886.         { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
  887.             { " et~al." * }
  888.             { " and " * s #2 "{vv~}{ll}" format.name$ * }
  889.           if$
  890.         }
  891.       if$
  892.     }
  893.   if$
  894. }
  895.  
  896. FUNCTION {author.key.label}
  897. { author empty$
  898.     { key empty$
  899.         { cite$ #1 #3 substring$ }
  900.         'key
  901.       if$
  902.     }
  903.     { author format.lab.names }
  904.   if$
  905. }
  906.  
  907. FUNCTION {author.editor.key.label}
  908. { author empty$
  909.     { editor empty$
  910.         { key empty$
  911.             { cite$ #1 #3 substring$ }
  912.             'key
  913.           if$
  914.         }
  915.         { editor format.lab.names }
  916.       if$
  917.     }
  918.     { author format.lab.names }
  919.   if$
  920. }
  921.  
  922. FUNCTION {editor.key.label}
  923. { editor empty$
  924.     { key empty$
  925.         { cite$ #1 #3 substring$ }
  926.         'key
  927.       if$
  928.     }
  929.     { editor format.lab.names }
  930.   if$
  931. }
  932.  
  933. FUNCTION {calc.label}
  934. { type$ "book" =
  935.   type$ "inbook" =
  936.   or
  937.     'author.editor.key.label
  938.     { type$ "proceedings" =
  939.         'editor.key.label
  940.         'author.key.label
  941.       if$
  942.     }
  943.   if$
  944.   emphasize
  945.   "("
  946.   *
  947.   year duplicate$ empty$
  948.      { pop$ "????" }
  949.      { purify$ #-1 #4 substring$ }
  950.   if$
  951.   *
  952.   'label :=
  953. }
  954.  
  955. FUNCTION {sort.format.names}
  956. { 's :=
  957.   #1 'nameptr :=
  958.   ""
  959.   s num.names$ 'numnames :=
  960.   numnames 'namesleft :=
  961.     { namesleft #0 > }
  962.     { nameptr #1 >
  963.         { "   " * }
  964.         'skip$
  965.       if$
  966.       s nameptr
  967.       "{vv{ } }{ll{ }}{  f{ }}{  jj{ }}"
  968.       format.name$ 't :=
  969.       nameptr numnames = t "others" = and
  970.         { "et al" * }
  971.         { numnames #2 > nameptr #2 = and
  972.           { "zzzzzz" * #1 'namesleft := }
  973.           { t sortify * }
  974.         if$
  975.         }
  976.       if$
  977.       nameptr #1 + 'nameptr :=
  978.       namesleft #1 - 'namesleft :=
  979.     }
  980.   while$
  981. }
  982.  
  983. FUNCTION {sort.format.title}
  984. { 't :=
  985.   "A " #2
  986.     "An " #3
  987.       "The " #4 t chop.word
  988.     chop.word
  989.   chop.word
  990.   sortify
  991.   #1 global.max$ substring$
  992. }
  993.  
  994. FUNCTION {author.sort}
  995. { author empty$
  996.     { key empty$
  997.         { "to sort, need author or key in " cite$ * warning$
  998.           ""
  999.         }
  1000.         { key sortify }
  1001.       if$
  1002.     }
  1003.     { author sort.format.names }
  1004.   if$
  1005. }
  1006.  
  1007. FUNCTION {author.editor.sort}
  1008. { author empty$
  1009.     { editor empty$
  1010.         { key empty$
  1011.             { "to sort, need author, editor, or key in " cite$ * warning$
  1012.               ""
  1013.             }
  1014.             { key sortify }
  1015.           if$
  1016.         }
  1017.         { editor sort.format.names }
  1018.       if$
  1019.     }
  1020.     { author sort.format.names }
  1021.   if$
  1022. }
  1023.  
  1024. FUNCTION {editor.sort}
  1025. { editor empty$
  1026.     { key empty$
  1027.         { "to sort, need editor or key in " cite$ * warning$
  1028.           ""
  1029.         }
  1030.         { key sortify }
  1031.       if$
  1032.     }
  1033.     { editor sort.format.names }
  1034.   if$
  1035. }
  1036.  
  1037. FUNCTION {presort}
  1038. { calc.label
  1039.   label sortify
  1040.   "    "
  1041.   *
  1042.   type$ "book" =
  1043.   type$ "inbook" =
  1044.   or
  1045.     'author.editor.sort
  1046.     { type$ "proceedings" =
  1047.         'editor.sort
  1048.         'author.sort
  1049.       if$
  1050.     }
  1051.   if$
  1052.   #1 entry.max$ substring$
  1053.   'sort.label :=
  1054.   sort.label
  1055.   *
  1056.   "    "
  1057.   *
  1058.   title field.or.null
  1059.   sort.format.title
  1060.   *
  1061.   #1 entry.max$ substring$
  1062.   'sort.key$ :=
  1063. }
  1064.  
  1065. ITERATE {presort}
  1066.  
  1067. SORT
  1068.  
  1069. STRINGS { last.label next.extra }
  1070.  
  1071. INTEGERS { last.extra.num }
  1072.  
  1073. FUNCTION {initialize.extra.label.stuff}
  1074. { #0 int.to.chr$ 'last.label :=
  1075.   "" 'next.extra :=
  1076.   #0 'last.extra.num :=
  1077. }
  1078.  
  1079. FUNCTION {forward.pass}
  1080. { last.label label =
  1081.     { last.extra.num #1 + 'last.extra.num :=
  1082.       last.extra.num int.to.chr$ 'extra.label :=
  1083.     }
  1084.     { "a" chr.to.int$ 'last.extra.num :=
  1085.       "" 'extra.label :=
  1086.       label 'last.label :=
  1087.     }
  1088.   if$
  1089. }
  1090.  
  1091. FUNCTION {reverse.pass}
  1092. { next.extra "b" =
  1093.     { "a" 'extra.label := }
  1094.     'skip$
  1095.   if$
  1096.   extra.label 'next.extra :=
  1097.   label extra.label * 'label :=
  1098. }
  1099.  
  1100. EXECUTE {initialize.extra.label.stuff}
  1101.  
  1102. ITERATE {forward.pass}
  1103.  
  1104. REVERSE {reverse.pass}
  1105.  
  1106. FUNCTION {bib.sort.order}
  1107. { sort.label
  1108.   "    "
  1109.   *
  1110.   year field.or.null sortify
  1111.   *
  1112.   "    "
  1113.   *
  1114.   title field.or.null
  1115.   sort.format.title
  1116.   *
  1117.   #1 entry.max$ substring$
  1118.   'sort.key$ :=
  1119. }
  1120.  
  1121. ITERATE {bib.sort.order}
  1122.  
  1123. SORT
  1124.  
  1125. FUNCTION {begin.bib}
  1126. { preamble$ empty$
  1127.     'skip$
  1128.     { preamble$ write$ newline$ }
  1129.   if$
  1130.   "\begin{thebibliography}{}" write$ newline$
  1131. }
  1132.  
  1133. EXECUTE {begin.bib}
  1134.  
  1135. EXECUTE {init.state.consts}
  1136.  
  1137. ITERATE {call.type$}
  1138.  
  1139. FUNCTION {end.bib}
  1140. { newline$
  1141.   "\end{thebibliography}" write$ newline$
  1142. }
  1143.  
  1144. EXECUTE {end.bib}
  1145. %% End of customized bst file 
  1146.